.class public Lcom/noshufou/android/su/service/PermissionsDbService;
.super Landroid/app/IntentService;
.source "PermissionsDbService.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/noshufou/android/su/service/PermissionsDbService$PermissionsDbOpenHelper;
    }
.end annotation


# static fields
.field private static final ATTEMPT_PREF:Ljava/lang/String; = "clean_permissions_attempt"

.field private static final COLUMN_ALLOW:I = 0x6

.field private static final COLUMN_EXEC_CMD:I = 0x5

.field private static final COLUMN_EXEC_UID:I = 0x4

.field private static final COLUMN_ID:I = 0x0

.field private static final COLUMN_NAME:I = 0x3

.field private static final COLUMN_PACKAGE:I = 0x2

.field private static final COLUMN_UID:I = 0x1

.field private static final PROJECTION:[Ljava/lang/String; = null

.field private static final TAG:Ljava/lang/String; = "Su.PermissionsDbService"


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 31
    const/16 v0, 0x8

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    .line 32
    const-string v2, "_id"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "uid"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "package"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "name"

    aput-object v2, v0, v1

    const/4 v1, 0x4

    const-string v2, "exec_uid"

    aput-object v2, v0, v1

    const/4 v1, 0x5

    const-string v2, "exec_cmd"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    .line 33
    const-string v2, "allow"

    aput-object v2, v0, v1

    const/4 v1, 0x7

    const-string v2, "dirty"

    aput-object v2, v0, v1

    .line 31
    sput-object v0, Lcom/noshufou/android/su/service/PermissionsDbService;->PROJECTION:[Ljava/lang/String;

    .line 26
    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 45
    const-string v0, "Su.PermissionsDbService"

    invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V

    .line 46
    return-void
.end method


# virtual methods
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .locals 1
    .parameter "arg0"

    .prologue
    .line 51
    const/4 v0, 0x0

    return-object v0
.end method

.method protected onHandleIntent(Landroid/content/Intent;)V
    .locals 23
    .parameter "intent"

    .prologue
    .line 56
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "onHandleIntent()"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 57
    invoke-static/range {p0 .. p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v17

    .line 58
    .local v17, prefs:Landroid/content/SharedPreferences;
    const-string v3, "clean_permissions_attempt"

    const/4 v4, 0x0

    move-object/from16 v0, v17

    invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v10

    .line 59
    .local v10, attempt:I
    const/4 v8, 0x0

    .line 60
    .local v8, allDirty:Z
    const/16 v3, 0xa

    if-le v10, v3, :cond_5

    .line 61
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "tried to many times, wipe permissions.sqlite and start again"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 62
    const-string v3, "permissions.sqlite"

    move-object/from16 v0, p0

    invoke-virtual {v0, v3}, Lcom/noshufou/android/su/service/PermissionsDbService;->deleteDatabase(Ljava/lang/String;)Z

    .line 63
    const/4 v8, 0x1

    .line 68
    :cond_0
    const/16 v16, 0x0

    .line 69
    .local v16, pDb:Landroid/database/sqlite/SQLiteDatabase;
    invoke-virtual/range {p0 .. p0}, Lcom/noshufou/android/su/service/PermissionsDbService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    .line 71
    .local v2, cr:Landroid/content/ContentResolver;
    :try_start_0
    new-instance v3, Lcom/noshufou/android/su/service/PermissionsDbService$PermissionsDbOpenHelper;

    move-object/from16 v0, p0

    move-object/from16 v1, p0

    invoke-direct {v3, v0, v1}, Lcom/noshufou/android/su/service/PermissionsDbService$PermissionsDbOpenHelper;-><init>(Lcom/noshufou/android/su/service/PermissionsDbService;Landroid/content/Context;)V

    invoke-virtual {v3}, Lcom/noshufou/android/su/service/PermissionsDbService$PermissionsDbOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v16

    .line 72
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "permissions.sqlite opened"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 73
    const/4 v5, 0x0

    .line 74
    .local v5, where:Ljava/lang/String;
    const/4 v6, 0x0

    check-cast v6, [Ljava/lang/String;

    .line 75
    .local v6, whereArgs:[Ljava/lang/String;
    if-nez v8, :cond_1

    .line 76
    const-string v5, "dirty=?"

    .line 77
    const/4 v3, 0x1

    new-array v6, v3, [Ljava/lang/String;

    .end local v6           #whereArgs:[Ljava/lang/String;
    const/4 v3, 0x0

    const-string v4, "1"

    aput-object v4, v6, v3

    .line 79
    .restart local v6       #whereArgs:[Ljava/lang/String;
    :cond_1
    sget-object v3, Lcom/noshufou/android/su/provider/PermissionsProvider$Apps;->CONTENT_URI:Landroid/net/Uri;

    .line 80
    sget-object v4, Lcom/noshufou/android/su/service/PermissionsDbService;->PROJECTION:[Ljava/lang/String;

    const/4 v7, 0x0

    .line 79
    invoke-virtual/range {v2 .. v7}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v11

    .line 81
    .local v11, c:Landroid/database/Cursor;
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "got cursor from su.db"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 82
    :cond_2
    :goto_0
    invoke-interface {v11}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v3

    if-nez v3, :cond_6

    .line 131
    if-eqz v16, :cond_3

    .line 132
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "closing permissions.sqlite"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 133
    invoke-virtual/range {v16 .. v16}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 136
    :cond_3
    invoke-static/range {p0 .. p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    .line 137
    const-string v4, "permissions_dirty"

    const/4 v7, 0x0

    invoke-interface {v3, v4, v7}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    .line 138
    const-string v4, "clean_permissions_attempt"

    const/4 v7, 0x0

    invoke-interface {v3, v4, v7}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    .line 139
    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 140
    .end local v2           #cr:Landroid/content/ContentResolver;
    .end local v5           #where:Ljava/lang/String;
    .end local v6           #whereArgs:[Ljava/lang/String;
    .end local v11           #c:Landroid/database/Cursor;
    .end local v16           #pDb:Landroid/database/sqlite/SQLiteDatabase;
    :cond_4
    :goto_1
    return-void

    .line 64
    :cond_5
    const/16 v3, 0xc

    if-le v10, v3, :cond_0

    goto :goto_1

    .line 83
    .restart local v2       #cr:Landroid/content/ContentResolver;
    .restart local v5       #where:Ljava/lang/String;
    .restart local v6       #whereArgs:[Ljava/lang/String;
    .restart local v11       #c:Landroid/database/Cursor;
    .restart local v16       #pDb:Landroid/database/sqlite/SQLiteDatabase;
    :cond_6
    :try_start_1
    const-string v3, "Su.PermissionsDbService"

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v7, "row "

    invoke-direct {v4, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const/4 v7, 0x0

    invoke-interface {v11, v7}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v19

    move-wide/from16 v0, v19

    invoke-virtual {v4, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v7, " dirty, handle it"

    invoke-virtual {v4, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 84
    const-string v12, "uid=? AND exec_uid=? AND exec_cmd=?"

    .line 86
    .local v12, deleteWhere:Ljava/lang/String;
    const/4 v3, 0x3

    new-array v13, v3, [Ljava/lang/String;

    const/4 v3, 0x0

    .line 87
    const/4 v4, 0x1

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v13, v3

    const/4 v3, 0x1

    const/4 v4, 0x4

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v13, v3

    const/4 v3, 0x2

    .line 88
    const/4 v4, 0x5

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v13, v3

    .line 90
    .local v13, deleteWhereArgs:[Ljava/lang/String;
    const/4 v3, 0x6

    invoke-interface {v11, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    const/4 v4, -0x2

    if-ne v3, v4, :cond_7

    .line 91
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "needs deleted"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 92
    const-string v3, "apps"

    move-object/from16 v0, v16

    invoke-virtual {v0, v3, v12, v13}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    .line 93
    sget-object v3, Lcom/noshufou/android/su/provider/PermissionsProvider$Apps;->CONTENT_URI:Landroid/net/Uri;

    const-string v4, "clean"

    invoke-static {v3, v4}, Landroid/net/Uri;->withAppendedPath(Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v2, v3, v12, v13}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 95
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "delete completed"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_1 .. :try_end_1} :catch_0

    goto/16 :goto_0

    .line 119
    .end local v5           #where:Ljava/lang/String;
    .end local v6           #whereArgs:[Ljava/lang/String;
    .end local v11           #c:Landroid/database/Cursor;
    .end local v12           #deleteWhere:Ljava/lang/String;
    .end local v13           #deleteWhereArgs:[Ljava/lang/String;
    :catch_0
    move-exception v14

    .line 122
    .local v14, e:Landroid/database/sqlite/SQLiteException;
    :try_start_2
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "encountered an exception, schedule a restart"

    invoke-static {v3, v4, v14}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 123
    invoke-interface/range {v17 .. v17}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    const-string v4, "clean_permissions_attempt"

    add-int/lit8 v7, v10, 0x1

    invoke-interface {v3, v4, v7}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 124
    const-string v3, "alarm"

    move-object/from16 v0, p0

    invoke-virtual {v0, v3}, Lcom/noshufou/android/su/service/PermissionsDbService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Landroid/app/AlarmManager;

    .line 125
    .local v9, am:Landroid/app/AlarmManager;
    const/4 v3, 0x3

    .line 126
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v19

    const-wide/32 v21, 0xea60

    add-long v19, v19, v21

    .line 127
    const/4 v4, 0x0

    .line 128
    new-instance v7, Landroid/content/Intent;

    const-string v21, "com.noshufou.android.su.UPDATE_PERMISSIONS"

    move-object/from16 v0, v21

    invoke-direct {v7, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const/16 v21, 0x0

    .line 127
    move-object/from16 v0, p0

    move/from16 v1, v21

    invoke-static {v0, v4, v7, v1}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v4

    .line 125
    move-wide/from16 v0, v19

    invoke-virtual {v9, v3, v0, v1, v4}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 131
    if-eqz v16, :cond_4

    .line 132
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "closing permissions.sqlite"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 133
    invoke-virtual/range {v16 .. v16}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    goto/16 :goto_1

    .line 97
    .end local v9           #am:Landroid/app/AlarmManager;
    .end local v14           #e:Landroid/database/sqlite/SQLiteException;
    .restart local v5       #where:Ljava/lang/String;
    .restart local v6       #whereArgs:[Ljava/lang/String;
    .restart local v11       #c:Landroid/database/Cursor;
    .restart local v12       #deleteWhere:Ljava/lang/String;
    .restart local v13       #deleteWhereArgs:[Ljava/lang/String;
    :cond_7
    const/4 v3, 0x6

    :try_start_3
    invoke-interface {v11, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    const/4 v4, -0x1

    if-eq v3, v4, :cond_2

    .line 100
    const-string v3, "Su.PermissionsDbService"

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v7, "Updating permissions.sqlite for "

    invoke-direct {v4, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const/4 v7, 0x3

    invoke-interface {v11, v7}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v4, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 101
    const-string v3, "apps"

    move-object/from16 v0, v16

    invoke-virtual {v0, v3, v12, v13}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    .line 102
    new-instance v18, Landroid/content/ContentValues;

    invoke-direct/range {v18 .. v18}, Landroid/content/ContentValues;-><init>()V

    .line 103
    .local v18, values:Landroid/content/ContentValues;
    const-string v3, "_id"

    const/4 v4, 0x0

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v19

    invoke-static/range {v19 .. v20}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 104
    const-string v3, "uid"

    const/4 v4, 0x1

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getInt(I)I

    move-result v4

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 105
    const-string v3, "package"

    const/4 v4, 0x2

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 106
    const-string v3, "name"

    const/4 v4, 0x3

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 107
    const-string v3, "exec_uid"

    const/4 v4, 0x4

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getInt(I)I

    move-result v4

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 108
    const-string v3, "exec_cmd"

    const/4 v4, 0x5

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 109
    const-string v3, "allow"

    const/4 v4, 0x6

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getInt(I)I

    move-result v4

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    move-object/from16 v0, v18

    invoke-virtual {v0, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 110
    const-string v3, "apps"

    const/4 v4, 0x0

    move-object/from16 v0, v16

    move-object/from16 v1, v18

    invoke-virtual {v0, v3, v4, v1}, Landroid/database/sqlite/SQLiteDatabase;->insertOrThrow(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J

    .line 111
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "completed update"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 112
    new-instance v15, Landroid/content/ContentValues;

    invoke-direct {v15}, Landroid/content/ContentValues;-><init>()V

    .line 113
    .local v15, notDirty:Landroid/content/ContentValues;
    const-string v3, "dirty"

    const-string v4, "0"

    invoke-virtual {v15, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 115
    sget-object v3, Lcom/noshufou/android/su/provider/PermissionsProvider$Apps;->CONTENT_URI:Landroid/net/Uri;

    const/4 v4, 0x0

    invoke-interface {v11, v4}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v19

    move-wide/from16 v0, v19

    invoke-static {v3, v0, v1}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v3

    .line 116
    const/4 v4, 0x0

    const/4 v7, 0x0

    .line 114
    invoke-virtual {v2, v3, v15, v4, v7}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 117
    const-string v3, "Su.PermissionsDbService"

    const-string v4, "updated su.db as clean"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_3 .. :try_end_3} :catch_0

    goto/16 :goto_0

    .line 130
    .end local v5           #where:Ljava/lang/String;
    .end local v6           #whereArgs:[Ljava/lang/String;
    .end local v11           #c:Landroid/database/Cursor;
    .end local v12           #deleteWhere:Ljava/lang/String;
    .end local v13           #deleteWhereArgs:[Ljava/lang/String;
    .end local v15           #notDirty:Landroid/content/ContentValues;
    .end local v18           #values:Landroid/content/ContentValues;
    :catchall_0
    move-exception v3

    .line 131
    if-eqz v16, :cond_8

    .line 132
    const-string v4, "Su.PermissionsDbService"

    const-string v7, "closing permissions.sqlite"

    invoke-static {v4, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 133
    invoke-virtual/range {v16 .. v16}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 135
    :cond_8
    throw v3
.end method
